home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / s / usg5-4.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-07  |  5.1 KB  |  182 lines

  1. /* Definitions file for GNU Emacs running on AT&T's System V Release 4
  2.    Copyright (C) 1987, 1990 Free Software Foundation, Inc.
  3.  
  4. This file is part of GNU Emacs.
  5.  
  6. GNU Emacs is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2, or (at your option)
  9. any later version.
  10.  
  11. GNU Emacs is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with GNU Emacs; see the file COPYING.  If not, write to
  18. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  19.  
  20. /* Synched up with: FSF 19.29. */
  21.  
  22. /* This file written by James Van Artsdalen of Dell Computer Corporation.
  23.  * james@bigtex.cactus.org.  Subsequently improved for Dell 2.2 by Eric
  24.  * S. Raymond <esr@snark.thyrsus.com>.
  25.  */
  26.  
  27. /* Use the SysVr3 file for at least base configuration. */
  28.  
  29. #include "usg5-3.h"
  30.  
  31. #define USG5_4
  32.  
  33. /* On most SVR4 systems, gettimeofday takes one arg
  34.    and the compiler might crash.  */
  35. #define GETTIMEOFDAY_ONE_ARGUMENT
  36.  
  37. #define LIBS_SYSTEM -lsocket -lnsl -lelf
  38. #define ORDINARY_LINK
  39.  
  40. #if 0
  41. #ifdef ORDINARY_LINK
  42. #define LIB_STANDARD -lc /usr/ucblib/libucb.a
  43. #else
  44. #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
  45. #define LIB_STANDARD -lc /usr/ucblib/libucb.a /usr/ccs/lib/crtn.o
  46. #endif
  47. #else
  48.  
  49. #ifdef ORDINARY_LINK
  50. #define LIB_STANDARD
  51. #else
  52. #define START_FILES pre-crt0.o /usr/ccs/lib/crt1.o /usr/ccs/lib/crti.o /usr/ccs/lib/values-Xt.o
  53. #define LIB_STANDARD -lc /usr/ccs/lib/crtn.o
  54. #endif
  55. #endif
  56.  
  57. /* there are no -lg libraries on this system, and no libPW */
  58.  
  59. #define LIBS_DEBUG
  60. #define LIBS_STANDARD -lc
  61.  
  62. /* No <sioctl.h> */
  63.  
  64. #define NO_SIOCTL_H
  65.  
  66. /* Undump with ELF */
  67.  
  68. #undef COFF
  69.  
  70. #define UNEXEC unexelf.o
  71.  
  72. /* <sys/stat.h> *defines* stat(2) as a static function.  If "static"
  73.  * is blank, then many files will have a public definition for stat(2).
  74.  */
  75.  
  76. #undef static
  77.  
  78. /* Get <sys/ttold.h> to get struct
  79.  * tchars. But get <termio.h> first to make sure ttold.h doesn't
  80.  * interfere.
  81.  */
  82.  
  83. #ifdef emacs
  84. #include <sys/filio.h>
  85. #include <termio.h>
  86. #include <sys/ttold.h>
  87. #include <signal.h>
  88. #include <sys/wait.h>
  89. #include <sys/stream.h>
  90. #include <sys/stropts.h>
  91. #include <sys/termios.h>
  92. #endif
  93.  
  94. #undef BROKEN_SIGIO
  95.  
  96. /* Some SVr4s don't define NSIG in sys/signal.h for ANSI environments;
  97.  * instead, there's a system variable _sys_nsig.  Unfortunately, we need the
  98.  * constant to dimension an array.  So wire in the appropriate value here.
  99.  */
  100.  
  101. #ifndef NSIG
  102. #define NSIG    32
  103. #endif
  104.  
  105. /* We need bss_end from emacs.c for undumping */
  106.  
  107. #ifndef USG_SHARED_LIBRARIES
  108. #define USG_SHARED_LIBRARIES
  109. #endif
  110.  
  111. #define HAVE_PTYS
  112. #undef BROKEN_TIOCGWINSZ
  113. #undef BROKEN_TIOCGETC
  114.  
  115. /* TIOCGPGRP is broken in SysVr4, so we can't send signals to PTY
  116.    subprocesses the usual way.  But TIOCSIGNAL does work for PTYs, and
  117.    this is all we need.  */
  118.  
  119. #define TIOCSIGSEND TIOCSIGNAL
  120.  
  121. /* This change means that we don't loop through allocate_pty too many
  122.    times in the (rare) event of a failure. */
  123.  
  124. #undef FIRST_PTY_LETTER
  125. #define FIRST_PTY_LETTER 'z'
  126.  
  127. /* This sets the name of the master side of the PTY. */
  128.  
  129. #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx");
  130.  
  131. /* This sets the name of the slave side of the PTY.  On SysVr4,
  132.    grantpt(3) forks a subprocess, so keep sigchld_handler() from
  133.    intercepting that death.  If any child but grantpt's should die
  134.    within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
  135.  
  136. /* XEmacs change */
  137. #ifndef NOT_C_CODE
  138. # if !__STDC__ && !defined(STDC_HEADERS)
  139. char *ptsname ();
  140. # endif
  141. #endif
  142.  
  143. #define PTY_TTY_NAME_SPRINTF                \
  144.   {                            \
  145.     char *ptyname;                    \
  146.                             \
  147.     EMACS_BLOCK_SIGCHLD;                \
  148.     if (grantpt (fd) == -1)                \
  149.       { close (fd); return -1; }            \
  150.     EMACS_UNBLOCK_SIGCHLD;                \
  151.     if (unlockpt (fd) == -1)                \
  152.       { close (fd); return -1; }            \
  153.     if (!(ptyname = ptsname (fd)))            \
  154.       { close (fd); return -1; }            \
  155.     strncpy (pty_name, ptyname, sizeof (pty_name));    \
  156.     pty_name[sizeof (pty_name) - 1] = 0;        \
  157.   }
  158.  
  159. /* Push various streams modules onto a PTY channel. */
  160.  
  161. #define SETUP_SLAVE_PTY \
  162.   if (ioctl (xforkin, I_PUSH, "ptem") == -1)    \
  163.     fatal ("ioctl I_PUSH ptem", errno);        \
  164.   if (ioctl (xforkin, I_PUSH, "ldterm") == -1)    \
  165.     fatal ("ioctl I_PUSH ldterm", errno);    \
  166.   if (ioctl (xforkin, I_PUSH, "ttcompat") == -1) \
  167.     fatal ("ioctl I_PUSH ttcompat", errno);
  168.  
  169. /* Undo the SVr3 X11 library definition */
  170. #undef LIB_X11_LIB
  171.  
  172. /* The definition of this in s-usg5-3.h is not needed in 5.4.  */
  173. /* liblnsl_s should never be used.  The _s suffix implies a shared
  174.    library, as opposed to a DLL.  Share libraries were used in SVR3, and are
  175.    available only in order to allow SVR3 binaries to run.  They should not be
  176.    linked in to new binaries. -- caraway!pinkas@caraway.intel.com.  */
  177. #undef LIBX10_SYSTEM
  178. #undef LIBX11_SYSTEM
  179.  
  180. /* Tell x11term.c and keyboard.c we have the system V streams feature.  */
  181. #define SYSV_STREAMS
  182.